					       <div>
								<script type="text/javascript">
									$(function(){
							
						
										// Dialog			
										$('#dialog').dialog({
											autoOpen: false,
											width: 700,
											height: 550,
											buttons: {
												"Ok": function() { 
													$(this).dialog("close"); 
												}, 
												"Cancel": function() { 
													$(this).dialog("close"); 
												} 
											}
										});
										
										// Dialog Link
										$('#dialog_link').click(function(){
											$('#dialog').dialog('open');
											return false;
										});
										
										//hover states on the static widgets
										$('#dialog_link, ul#icons li').hover(
											function() { $(this).addClass('ui-state-hover'); }, 
											function() { $(this).removeClass('ui-state-hover'); }
										)
										
									});
								</script>       
								<style type="text/css">
									#dialog_link {padding: .4em 1em .4em 20px;text-decoration: none;position: relative;}
									#dialog_link span.ui-icon {margin: 0 5px 0 0;position: absolute;left: .2em;top: 50%;margin-top: -8px;}
									ul#icons {margin: 0; padding: 0;}
									ul#icons li {margin: 2px; position: relative; padding: 4px 0; cursor: pointer; float: left;  list-style: none;}
									ul#icons span.ui-icon {float: left; margin: 0 4px;}
								</style>
									<p>
									<a href="#" id="dialog_link" class="ui-state-default ui-corner-all">
										<span class="ui-icon ui-icon-newwin"></span>แสดงกราฟ
									</a>
									</p>
									
						            <!-- ui-dialog -->
									<div id="dialog" title="กราฟ">	
										<!-- amcharts script-->
										<!-- swf object (version 2.2) is used to detect if flash is installed and include swf in the page -->
										<script type="text/javascript" src="../amcharts/flash/swfobject.js"></script>
								
										<!-- chart is placed in this div. if you have more than one chart on a page, give unique id for each div -->
										<div id="chart1"></div>
									        <%
									        //ReportByOPEC reportByOPEC = new ReportByOPEC();
										    //String xmlOPEC = reportByOPEC.getXMLDataGraph();
											//System.out.println(xmlOPEC);
									        %> 
										    <script type="text/javascript">
										    
									            var params = {
									                bgcolor:"#FFFFFF"
									                };
									
											    var flashVars = {
											        path: "../amcharts/flash/",
											        chart_settings: encodeURIComponent("<settings><background><alpha>100</alpha><border_alpha>20</border_alpha></background><legend><enabled>0</enabled><align>center</align></legend><pie><y>50%</y><inner_radius>30</inner_radius></pie><animation><start_time>2</start_time><start_effect>strong</start_effect><pull_out_time>1.5</pull_out_time></animation><data_labels><show>{title}: {value}</show><max_width>140</max_width></data_labels></settings>"),
											        //settings_file: "test/settings.xml",
									                chart_data: encodeURIComponent("<pie><slice title='United States'>19544</slice><slice title='Japan'>5455</slice><slice title='Unresolved'>4229</slice><slice title='France'>2313</slice><slice title='Germany'>2208</slice><slice title='United Kingdom'>2057</slice><slice title='India'>1771</slice><slice title='Russian Federation'>1495</slice><slice title='Korea, Republic of'>1281</slice></pie>"),
											        chart_id:"chart1"
												};
									
										    	swfobject.embedSWF("../amcharts/flash/ampie.swf", "chart1", "600", "400", "8.0.0", "../amcharts/flash/expressInstall.swf", flashVars, params);
									 
									        </script>
									 </div>
					       </div>						
					       <div>
								<script type="text/javascript">
									$(function(){
							
						
										// Dialog			
										$('#dialog2').dialog({
											autoOpen: false,
											width: 700,
											height: 550,
											buttons: {
												"Ok": function() { 
													$(this).dialog("close"); 
												}, 
												"Cancel": function() { 
													$(this).dialog("close"); 
												} 
											}
										});
										
										// Dialog Link
										$('#dialog_link2').click(function(){
											$('#dialog2').dialog('open');
											return false;
										});
										
									});
								</script>       
								<style type="text/css">
									#dialog_link {padding: .4em 1em .4em 20px;text-decoration: none;position: relative;}
									#dialog_link span.ui-icon {margin: 0 5px 0 0;position: absolute;left: .2em;top: 50%;margin-top: -8px;}
									ul#icons {margin: 0; padding: 0;}
									ul#icons li {margin: 2px; position: relative; padding: 4px 0; cursor: pointer; float: left;  list-style: none;}
									ul#icons span.ui-icon {float: left; margin: 0 4px;}
								</style>
									<p>
									<a href="#" id="dialog_link2">
										test
									</a>
									</p>
									
						            <!-- ui-dialog -->
									<div id="dialog2" title="กราฟ">	
										<!-- amcharts script-->
										<!-- swf object (version 2.2) is used to detect if flash is installed and include swf in the page -->
										<script type="text/javascript" src="../amcharts/flash/swfobject.js"></script>
								
										<!-- chart is placed in this div. if you have more than one chart on a page, give unique id for each div -->
										<div id="pie"></div>
										
										    <script type="text/javascript">
										    
									            var params = {
									                bgcolor:"#FFFFFF"
									                };
									
											    var flashVars = {
											        path: "../amcharts/flash/",
											        chart_settings: encodeURIComponent("<settings><background><alpha>100</alpha><border_alpha>20</border_alpha></background><grid><category><dashed>1</dashed></category><value><dashed>1</dashed></value></grid><axes><category><width>1</width><color>E7E7E7</color></category><value><width>1</width><color>E7E7E7</color></value></axes><values><value><min>0</min></value></values><depth>15</depth><column><width>85</width><balloon_text>{title}: {value} downloads</balloon_text><grow_time>3</grow_time></column><graphs><graph gid='0'><title>Stock</title><color>ADD981</color></graph><graph gid='1'><title>Column</title><color>7F8DA9</color></graph><graph gid='2'><title>Line</title><color>FEC514</color></graph></graphs><labels><label lid='0'><text><![CDATA[<b>Daily downloads</b>]]></text><y>18</y><text_color>000000</text_color><text_size>13</text_size><align>center</align></label></labels></settings>"),
									                chart_data: encodeURIComponent("<chart><series><value xid='0'>21 Jan</value><value xid='1'>22 Jan</value><value xid='2'>23 Jan</value><value xid='3'>24 Jan</value><value xid='4'>25 Jan</value></series><graphs><graph gid='0'><value xid='0'>91</value><value xid='1'>87</value><value xid='2'>68</value><value xid='3'>30</value><value xid='4'>52</value></graph><graph gid='1'><value xid='0'>96</value><value xid='1'>112</value><value xid='2'>79</value><value xid='3'>32</value><value xid='4'>57</value></graph><graph gid='2'><value xid='0'>69</value><value xid='1'>101</value><value xid='2'>66</value><value xid='3'>23</value><value xid='4'>41</value></graph></graphs></chart>"),
											        chart_id:"pie"
												};
									
										    	swfobject.embedSWF("../amcharts/flash/amcolumn.swf", "pie", "600", "400", "8.0.0", "../amcharts/flash/expressInstall.swf", flashVars, params);
									 
									        </script>
									 </div>
					       </div>